!function(e, t, n) {
    "use strict";
    "undefined" != typeof MODULE_SUPPORT && !0 === MODULE_SUPPORT ? "function" == typeof define && define.amd ? define(n) : "undefined" != typeof module && module.exports ? module.exports = n() : t.exports ? t.exports = n() : t[e] = n() : t[e] = n()
}("Fingerprint2Shrinked", this, function() {
    "use strict";
    Array.prototype.indexOf || (Array.prototype.indexOf = function(e, t) {
        var n;
        if (null == this)
            throw new TypeError("'this' is null or undefined");
        var i = Object(this)
          , a = i.length >>> 0;
        if (0 === a)
            return -1;
        var r = +t || 0;
        if (Math.abs(r) === 1 / 0 && (r = 0),
        r >= a)
            return -1;
        for (n = Math.max(r >= 0 ? r : a - Math.abs(r), 0); n < a; ) {
            if (n in i && i[n] === e)
                return n;
            n++
        }
        return -1
    }
    );
    var e = function(t) {
        if (!(this instanceof e))
            return new e(t);
        var n = {
            detectScreenOrientation: !0,
            sortPluginsFor: [/palemoon/i]
        };
        this.options = this.extend(t, n),
        this.nativeForEach = Array.prototype.forEach,
        this.nativeMap = Array.prototype.map
    };
    return e.prototype = {
        extend: function(e, t) {
            if (null == e)
                return t;
            for (var n in e)
                null != e[n] && t[n] !== e[n] && (t[n] = e[n]);
            return t
        },
        log: function(e) {
            window.console && console.log(e)
        },
        get: function(e) {
            var t = [];
            t = this.userAgentKey(t),
            t = this.languageKey(t),
            t = this.colorDepthKey(t),
            t = this.pixelRatioKey(t),
            t = this.screenResolutionKey(t),
            t = this.availableScreenResolutionKey(t),
            t = this.timezoneOffsetKey(t),
            t = this.sessionStorageKey(t),
            t = this.localStorageKey(t),
            t = this.indexedDbKey(t),
            t = this.addBehaviorKey(t),
            t = this.openDatabaseKey(t),
            t = this.cpuClassKey(t),
            t = this.platformKey(t),
            t = this.doNotTrackKey(t),
            t = this.adBlockKey(t),
            t = this.hasLiedLanguagesKey(t),
            t = this.hasLiedResolutionKey(t),
            t = this.hasLiedOsKey(t),
            t = this.hasLiedBrowserKey(t),
            t = this.touchSupportKey(t);
            var n = this
              , i = []
              , a = {};
            return n.each(t, function(e) {
                var t = e.value;
                void 0 !== e.value.join && (t = e.value.join(";")),
                i.push(t),
                a[e.key] = e.value
            }),
            e(n.x64hash128(i.join("~~~"), 31), t, a)
        },
        userAgentKey: function(e) {
            return this.options.excludeUserAgent || e.push({
                key: "user_agent",
                value: this.getUserAgent()
            }),
            e
        },
        getUserAgent: function() {
            return navigator.userAgent
        },
        languageKey: function(e) {
            return this.options.excludeLanguage || e.push({
                key: "language",
                value: navigator.language || navigator.userLanguage || navigator.browserLanguage || navigator.systemLanguage || ""
            }),
            e
        },
        colorDepthKey: function(e) {
            return this.options.excludeColorDepth || e.push({
                key: "color_depth",
                value: screen.colorDepth || -1
            }),
            e
        },
        pixelRatioKey: function(e) {
            return this.options.excludePixelRatio || e.push({
                key: "pixel_ratio",
                value: this.getPixelRatio()
            }),
            e
        },
        getPixelRatio: function() {
            return window.devicePixelRatio || ""
        },
        screenResolutionKey: function(e) {
            return this.options.excludeScreenResolution ? e : this.getScreenResolution(e)
        },
        getScreenResolution: function(e) {
            var t;
            return t = this.options.detectScreenOrientation && screen.height > screen.width ? [screen.height, screen.width] : [screen.width, screen.height],
            void 0 !== t && e.push({
                key: "resolution",
                value: t
            }),
            e
        },
        availableScreenResolutionKey: function(e) {
            return this.options.excludeAvailableScreenResolution ? e : this.getAvailableScreenResolution(e)
        },
        getAvailableScreenResolution: function(e) {
            var t;
            return screen.availWidth && screen.availHeight && (t = this.options.detectScreenOrientation ? screen.availHeight > screen.availWidth ? [screen.availHeight, screen.availWidth] : [screen.availWidth, screen.availHeight] : [screen.availHeight, screen.availWidth]),
            void 0 !== t && e.push({
                key: "available_resolution",
                value: t
            }),
            e
        },
        timezoneOffsetKey: function(e) {
            return this.options.excludeTimezoneOffset || e.push({
                key: "timezone_offset",
                value: (new Date).getTimezoneOffset()
            }),
            e
        },
        sessionStorageKey: function(e) {
            return !this.options.excludeSessionStorage && this.hasSessionStorage() && e.push({
                key: "session_storage",
                value: 1
            }),
            e
        },
        localStorageKey: function(e) {
            return !this.options.excludeSessionStorage && this.hasLocalStorage() && e.push({
                key: "local_storage",
                value: 1
            }),
            e
        },
        indexedDbKey: function(e) {
            return !this.options.excludeIndexedDB && this.hasIndexedDB() && e.push({
                key: "indexed_db",
                value: 1
            }),
            e
        },
        addBehaviorKey: function(e) {
            return document.body && !this.options.excludeAddBehavior && document.body.addBehavior && e.push({
                key: "add_behavior",
                value: 1
            }),
            e
        },
        openDatabaseKey: function(e) {
            return !this.options.excludeOpenDatabase && window.openDatabase && e.push({
                key: "open_database",
                value: 1
            }),
            e
        },
        cpuClassKey: function(e) {
            return this.options.excludeCpuClass || e.push({
                key: "cpu_class",
                value: this.getNavigatorCpuClass()
            }),
            e
        },
        platformKey: function(e) {
            return this.options.excludePlatform || e.push({
                key: "navigator_platform",
                value: this.getNavigatorPlatform()
            }),
            e
        },
        doNotTrackKey: function(e) {
            return this.options.excludeDoNotTrack || e.push({
                key: "do_not_track",
                value: this.getDoNotTrack()
            }),
            e
        },
        adBlockKey: function(e) {
            return this.options.excludeAdBlock || e.push({
                key: "adblock",
                value: Number(this.getAdBlock())
            }),
            e
        },
        hasLiedLanguagesKey: function(e) {
            return this.options.excludeHasLiedLanguages || e.push({
                key: "has_lied_languages",
                value: Number(this.getHasLiedLanguages())
            }),
            e
        },
        hasLiedResolutionKey: function(e) {
            return this.options.excludeHasLiedResolution || e.push({
                key: "has_lied_resolution",
                value: Number(this.getHasLiedResolution())
            }),
            e
        },
        hasLiedOsKey: function(e) {
            return this.options.excludeHasLiedOs || e.push({
                key: "has_lied_os",
                value: Number(this.getHasLiedOs())
            }),
            e
        },
        hasLiedBrowserKey: function(e) {
            return this.options.excludeHasLiedBrowser || e.push({
                key: "has_lied_browser",
                value: Number(this.getHasLiedBrowser())
            }),
            e
        },
        getRegularPlugins: function() {
            for (var e = [], t = 0, n = navigator.plugins.length; t < n; t++)
                e.push(navigator.plugins[t]);
            return this.pluginsShouldBeSorted() && (e = e.sort(function(e, t) {
                return e.name > t.name ? 1 : e.name < t.name ? -1 : 0
            })),
            this.map(e, function(e) {
                var t = this.map(e, function(e) {
                    return [e.type, e.suffixes].join("~")
                }).join(",");
                return [e.name, e.description, t].join("::")
            }, this)
        },
        touchSupportKey: function(e) {
            return this.options.excludeTouchSupport || e.push({
                key: "touch_support",
                value: this.getTouchSupport()
            }),
            e
        },
        hasSessionStorage: function() {
            try {
                return !!window.sessionStorage
            } catch (e) {
                return !0
            }
        },
        hasLocalStorage: function() {
            try {
                return !!window.localStorage
            } catch (e) {
                return !0
            }
        },
        hasIndexedDB: function() {
            return !!window.indexedDB
        },
        getNavigatorCpuClass: function() {
            return navigator.cpuClass ? navigator.cpuClass : "unknown"
        },
        getNavigatorPlatform: function() {
            return navigator.platform ? navigator.platform : "unknown"
        },
        getDoNotTrack: function() {
            return navigator.doNotTrack ? navigator.doNotTrack : navigator.msDoNotTrack ? navigator.msDoNotTrack : window.doNotTrack ? window.doNotTrack : "unknown"
        },
        getTouchSupport: function() {
            var e = 0
              , t = 0;
            void 0 !== navigator.maxTouchPoints ? e = navigator.maxTouchPoints : void 0 !== navigator.msMaxTouchPoints && (e = navigator.msMaxTouchPoints);
            try {
                document.createEvent("TouchEvent"),
                t = 1
            } catch (e) {}
            return [e, t, Number("ontouchstart"in window)]
        },
        getAdBlock: function() {
            var e = document.createElement("div");
            e.innerHTML = "&nbsp;",
            e.className = "adsbox";
            var t = !1;
            try {
                document.body.appendChild(e),
                t = 0 === document.getElementsByClassName("adsbox")[0].offsetHeight,
                document.body.removeChild(e)
            } catch (e) {
                t = !1
            }
            return t
        },
        getHasLiedLanguages: function() {
            if (void 0 !== navigator.languages)
                try {
                    if (navigator.languages[0].substr(0, 2) !== navigator.language.substr(0, 2))
                        return !0
                } catch (e) {
                    return !0
                }
            return !1
        },
        getHasLiedResolution: function() {
            return screen.width < screen.availWidth || screen.height < screen.availHeight
        },
        getHasLiedOs: function() {
            var e, t = navigator.userAgent.toLowerCase(), n = navigator.oscpu, i = navigator.platform.toLowerCase();
            e = t.indexOf("windows phone") >= 0 ? "Windows Phone" : t.indexOf("win") >= 0 ? "Windows" : t.indexOf("android") >= 0 ? "Android" : t.indexOf("linux") >= 0 ? "Linux" : t.indexOf("iphone") >= 0 || t.indexOf("ipad") >= 0 ? "iOS" : t.indexOf("mac") >= 0 ? "Mac" : "Other";
            if (("ontouchstart"in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0) && "Windows Phone" !== e && "Android" !== e && "iOS" !== e && "Other" !== e)
                return !0;
            if (void 0 !== n) {
                if (n = n.toLowerCase(),
                n.indexOf("win") >= 0 && "Windows" !== e && "Windows Phone" !== e)
                    return !0;
                if (n.indexOf("linux") >= 0 && "Linux" !== e && "Android" !== e)
                    return !0;
                if (n.indexOf("mac") >= 0 && "Mac" !== e && "iOS" !== e)
                    return !0;
                if (0 === n.indexOf("win") && 0 === n.indexOf("linux") && n.indexOf("mac") >= 0 && "other" !== e)
                    return !0
            }
            return i.indexOf("win") >= 0 && "Windows" !== e && "Windows Phone" !== e || ((i.indexOf("linux") >= 0 || i.indexOf("android") >= 0 || i.indexOf("pike") >= 0) && "Linux" !== e && "Android" !== e || ((i.indexOf("mac") >= 0 || i.indexOf("ipad") >= 0 || i.indexOf("ipod") >= 0 || i.indexOf("iphone") >= 0) && "Mac" !== e && "iOS" !== e || (0 === i.indexOf("win") && 0 === i.indexOf("linux") && i.indexOf("mac") >= 0 && "other" !== e || void 0 === navigator.plugins && "Windows" !== e && "Windows Phone" !== e)))
        },
        getHasLiedBrowser: function() {
            var e, t = navigator.userAgent.toLowerCase(), n = navigator.productSub;
            if (("Chrome" === (e = t.indexOf("firefox") >= 0 ? "Firefox" : t.indexOf("opera") >= 0 || t.indexOf("opr") >= 0 ? "Opera" : t.indexOf("chrome") >= 0 ? "Chrome" : t.indexOf("safari") >= 0 ? "Safari" : t.indexOf("trident") >= 0 ? "Internet Explorer" : "Other") || "Safari" === e || "Opera" === e) && "20030107" !== n)
                return !0;
            var i = eval.toString().length;
            if (37 === i && "Safari" !== e && "Firefox" !== e && "Other" !== e)
                return !0;
            if (39 === i && "Internet Explorer" !== e && "Other" !== e)
                return !0;
            if (33 === i && "Chrome" !== e && "Opera" !== e && "Other" !== e)
                return !0;
            var a;
            try {
                throw "a"
            } catch (e) {
                try {
                    e.toSource(),
                    a = !0
                } catch (e) {
                    a = !1
                }
            }
            return !(!a || "Firefox" === e || "Other" === e)
        },
        each: function(e, t, n) {
            if (null !== e)
                if (this.nativeForEach && e.forEach === this.nativeForEach)
                    e.forEach(t, n);
                else if (e.length === +e.length) {
                    for (var i = 0, a = e.length; i < a; i++)
                        if (t.call(n, e[i], i, e) === {})
                            return
                } else
                    for (var r in e)
                        if (e.hasOwnProperty(r) && t.call(n, e[r], r, e) === {})
                            return
        },
        map: function(e, t, n) {
            var i = [];
            return null == e ? i : this.nativeMap && e.map === this.nativeMap ? e.map(t, n) : (this.each(e, function(e, a, r) {
                i[i.length] = t.call(n, e, a, r)
            }),
            i)
        },
        x64Add: function(e, t) {
            e = [e[0] >>> 16, 65535 & e[0], e[1] >>> 16, 65535 & e[1]],
            t = [t[0] >>> 16, 65535 & t[0], t[1] >>> 16, 65535 & t[1]];
            var n = [0, 0, 0, 0];
            return n[3] += e[3] + t[3],
            n[2] += n[3] >>> 16,
            n[3] &= 65535,
            n[2] += e[2] + t[2],
            n[1] += n[2] >>> 16,
            n[2] &= 65535,
            n[1] += e[1] + t[1],
            n[0] += n[1] >>> 16,
            n[1] &= 65535,
            n[0] += e[0] + t[0],
            n[0] &= 65535,
            [n[0] << 16 | n[1], n[2] << 16 | n[3]]
        },
        x64Multiply: function(e, t) {
            e = [e[0] >>> 16, 65535 & e[0], e[1] >>> 16, 65535 & e[1]],
            t = [t[0] >>> 16, 65535 & t[0], t[1] >>> 16, 65535 & t[1]];
            var n = [0, 0, 0, 0];
            return n[3] += e[3] * t[3],
            n[2] += n[3] >>> 16,
            n[3] &= 65535,
            n[2] += e[2] * t[3],
            n[1] += n[2] >>> 16,
            n[2] &= 65535,
            n[2] += e[3] * t[2],
            n[1] += n[2] >>> 16,
            n[2] &= 65535,
            n[1] += e[1] * t[3],
            n[0] += n[1] >>> 16,
            n[1] &= 65535,
            n[1] += e[2] * t[2],
            n[0] += n[1] >>> 16,
            n[1] &= 65535,
            n[1] += e[3] * t[1],
            n[0] += n[1] >>> 16,
            n[1] &= 65535,
            n[0] += e[0] * t[3] + e[1] * t[2] + e[2] * t[1] + e[3] * t[0],
            n[0] &= 65535,
            [n[0] << 16 | n[1], n[2] << 16 | n[3]]
        },
        x64Rotl: function(e, t) {
            return t %= 64,
            32 === t ? [e[1], e[0]] : t < 32 ? [e[0] << t | e[1] >>> 32 - t, e[1] << t | e[0] >>> 32 - t] : (t -= 32,
            [e[1] << t | e[0] >>> 32 - t, e[0] << t | e[1] >>> 32 - t])
        },
        x64LeftShift: function(e, t) {
            return t %= 64,
            0 === t ? e : t < 32 ? [e[0] << t | e[1] >>> 32 - t, e[1] << t] : [e[1] << t - 32, 0]
        },
        x64Xor: function(e, t) {
            return [e[0] ^ t[0], e[1] ^ t[1]]
        },
        x64Fmix: function(e) {
            return e = this.x64Xor(e, [0, e[0] >>> 1]),
            e = this.x64Multiply(e, [4283543511, 3981806797]),
            e = this.x64Xor(e, [0, e[0] >>> 1]),
            e = this.x64Multiply(e, [3301882366, 444984403]),
            e = this.x64Xor(e, [0, e[0] >>> 1])
        },
        x64hash128: function(e, t) {
            e = e || "",
            t = t || 0;
            for (var n = e.length % 16, i = e.length - n, a = [0, t], r = [0, t], o = [0, 0], s = [0, 0], c = [2277735313, 289559509], l = [1291169091, 658871167], d = 0; d < i; d += 16)
                o = [255 & e.charCodeAt(d + 4) | (255 & e.charCodeAt(d + 5)) << 8 | (255 & e.charCodeAt(d + 6)) << 16 | (255 & e.charCodeAt(d + 7)) << 24, 255 & e.charCodeAt(d) | (255 & e.charCodeAt(d + 1)) << 8 | (255 & e.charCodeAt(d + 2)) << 16 | (255 & e.charCodeAt(d + 3)) << 24],
                s = [255 & e.charCodeAt(d + 12) | (255 & e.charCodeAt(d + 13)) << 8 | (255 & e.charCodeAt(d + 14)) << 16 | (255 & e.charCodeAt(d + 15)) << 24, 255 & e.charCodeAt(d + 8) | (255 & e.charCodeAt(d + 9)) << 8 | (255 & e.charCodeAt(d + 10)) << 16 | (255 & e.charCodeAt(d + 11)) << 24],
                o = this.x64Multiply(o, c),
                o = this.x64Rotl(o, 31),
                o = this.x64Multiply(o, l),
                a = this.x64Xor(a, o),
                a = this.x64Rotl(a, 27),
                a = this.x64Add(a, r),
                a = this.x64Add(this.x64Multiply(a, [0, 5]), [0, 1390208809]),
                s = this.x64Multiply(s, l),
                s = this.x64Rotl(s, 33),
                s = this.x64Multiply(s, c),
                r = this.x64Xor(r, s),
                r = this.x64Rotl(r, 31),
                r = this.x64Add(r, a),
                r = this.x64Add(this.x64Multiply(r, [0, 5]), [0, 944331445]);
            switch (o = [0, 0],
            s = [0, 0],
            n) {
            case 15:
                s = this.x64Xor(s, this.x64LeftShift([0, e.charCodeAt(d + 14)], 48));
            case 14:
                s = this.x64Xor(s, this.x64LeftShift([0, e.charCodeAt(d + 13)], 40));
            case 13:
                s = this.x64Xor(s, this.x64LeftShift([0, e.charCodeAt(d + 12)], 32));
            case 12:
                s = this.x64Xor(s, this.x64LeftShift([0, e.charCodeAt(d + 11)], 24));
            case 11:
                s = this.x64Xor(s, this.x64LeftShift([0, e.charCodeAt(d + 10)], 16));
            case 10:
                s = this.x64Xor(s, this.x64LeftShift([0, e.charCodeAt(d + 9)], 8));
            case 9:
                s = this.x64Xor(s, [0, e.charCodeAt(d + 8)]),
                s = this.x64Multiply(s, l),
                s = this.x64Rotl(s, 33),
                s = this.x64Multiply(s, c),
                r = this.x64Xor(r, s);
            case 8:
                o = this.x64Xor(o, this.x64LeftShift([0, e.charCodeAt(d + 7)], 56));
            case 7:
                o = this.x64Xor(o, this.x64LeftShift([0, e.charCodeAt(d + 6)], 48));
            case 6:
                o = this.x64Xor(o, this.x64LeftShift([0, e.charCodeAt(d + 5)], 40));
            case 5:
                o = this.x64Xor(o, this.x64LeftShift([0, e.charCodeAt(d + 4)], 32));
            case 4:
                o = this.x64Xor(o, this.x64LeftShift([0, e.charCodeAt(d + 3)], 24));
            case 3:
                o = this.x64Xor(o, this.x64LeftShift([0, e.charCodeAt(d + 2)], 16));
            case 2:
                o = this.x64Xor(o, this.x64LeftShift([0, e.charCodeAt(d + 1)], 8));
            case 1:
                o = this.x64Xor(o, [0, e.charCodeAt(d)]),
                o = this.x64Multiply(o, c),
                o = this.x64Rotl(o, 31),
                o = this.x64Multiply(o, l),
                a = this.x64Xor(a, o)
            }
            return a = this.x64Xor(a, [0, e.length]),
            r = this.x64Xor(r, [0, e.length]),
            a = this.x64Add(a, r),
            r = this.x64Add(r, a),
            a = this.x64Fmix(a),
            r = this.x64Fmix(r),
            a = this.x64Add(a, r),
            r = this.x64Add(r, a),
            ("00000000" + (a[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (a[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (r[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (r[1] >>> 0).toString(16)).slice(-8)
        }
    },
    e.VERSION = "1.4.2",
    e
}),
// __challenger_conf.capi = "https://challenger.api.global.rakuten.com/v1.0",
// __challenger_conf.cpid = document.getElementById("cpid").value,
"" !== __challenger_conf.trackingId && void 0 !== __challenger_conf.trackingId || (__challenger_conf.trackingId = null);
var __challenger_stats = __challenger_stats || {}
  , __challenger_events = __challenger_events || {
    mm: 0,
    mc: 0,
    kp: 0,
    ts: 0
}
  , doRefresh = !0;
!function(e) {
    function t(e, t, n, i) {
        var a = __challenger_conf.capi + e;
        __challenger_conf.trackingId && (a = a.indexOf("?") > -1 ? a + "&tracking_id=" : a + "?tracking_id=",
        a += __challenger_conf.trackingId);
        var r = new XMLHttpRequest;
        r.onreadystatechange = function() {
            4 != this.readyState || 200 != this.status && 400 != this.status && 429 != this.status && 403 != this.status || i && "function" == typeof i && i(r.responseText, this.status)
        }
        ,
        r.open(t, a, !0),
        r.setRequestHeader("Content-Type", "text/plain; charset=utf-8"),
        r.send(JSON.stringify(n))
    }
    function n(e) {
        for (var t = "", n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = 0; i < x - e; i++)
            t += n.charAt(Math.floor(Math.random() * n.length));
        return t
    }
    function i(e, t) {
        return t = t || "",
        0 === e.substring(0, t.length).localeCompare(t)
    }
    function a(e, t, a) {
        for (var r = e + n(e.length), o = 0, s = w.x64hash128(r, t), c = i(s, a); !c; )
            o += 1,
            r = e + n(e.length),
            s = w.x64hash128(r, t),
            c = i(s, a);
        return r
    }
    function r(e) {
        if (g > 0)
            e.innerHTML = "<div class='pin-send-btn pin-disabled' id='pin-send-btn'>認証コードを送信</div><div class='pin-send-txt' id='pin-send-txt'>" + l("\ufeff{0}秒後に再度リクエストが可能になります", [g]) + "</div>",
            p = setTimeout(function() {
                g -= 1,
                r(e)
            }, 1100);
        else {
            e.innerHTML = "";
            var t = document.createElement("div");
            t.id = "pin-send-txt",
            t.className = "pin-send-txt";
            var n = document.createElement("div");
            n.id = "pin-send-btn",
            n.className = "pin-send-btn pin-enabled",
            n.innerHTML = "認証コードを送信",
            n.onclick = function() {
                h() && !v && (v = 1,
                S(),
                b(K))
            }
            ,
            t.appendChild(n),
            e.appendChild(t)
        }
    }
    function o() {
        var e = document.getElementById("pin-verifyphone-input");
        return c(e.value) || isNaN(e.value) ? (alert("正しい電話番号をご入力ください"),
        !1) : (window.__challenger_conf.p.phone = e.value,
        !0)
    }
    function s(e) {
        if (m > 0)
            e.innerHTML = "<div class='pin-resend-btn pin-disabled' id='pin-resend-btn'>認証コードのリクエスト</div><div class='pin-resend-txt' id='pin-resend-txt'>" + l("\ufeff{0}秒後に再度リクエストが可能になります", [m]) + "</div>",
            f = setTimeout(function() {
                m -= 1,
                s(e)
            }, 1100);
        else {
            e.innerHTML = "";
            var t = document.createElement("div");
            t.id = "pin-resend-txt",
            t.className = "pin-resend-txt";
            var n = document.createElement("div");
            n.id = "pin-resend-btn",
            n.className = "pin-resend-btn pin-enabled",
            n.innerHTML = "認証コードのリクエスト",
            n.onclick = function() {
                v || (v = 1,
                S(),
                b(K))
            }
            ,
            t.appendChild(n),
            e.appendChild(t)
        }
    }
    function c(e) {
        return !e || 0 === e.length
    }
    function l(e, t) {
        return e = e.replace(/{\d+}/g, function(e) {
            return t[e.replace(/{/, "").replace(/}/, "")] || e
        })
    }
    function d(e, t) {
        t.parentNode.insertBefore(e, t.nextSibling)
    }
    var h = o;
    null != e && (h = e.validatePhone || h);
    var u, p, f, g = 0, m = 0, v = 0, x = 16, _ = new Array;
    _.push = function() {
        return this.length >= 100 && this.shift(),
        Array.prototype.push.apply(this, arguments)
    }
    .bind(_);
    var y, C = document.createElement("script"), w = new Fingerprint2Shrinked;
    C.type = "text/javascript";
    var S = function() {
        w.get(function(e, t, n) {
            __challenger_stats.hash = e,
            __challenger_stats.components = n
        })
    }
      , O = function(e, t, n) {
        e.addEventListener ? e.addEventListener(t, n, !1) : e.attachEvent("on" + t, n)
    }
      , b = function(e) {
        var n = {
            pid: __challenger_conf.cpid,
            lang: __challenger_conf.lang,
            rat: __challenger_stats,
            param: __challenger_conf.param
        };
        window.__challenger_conf.p && (n.param = window.__challenger_conf.p),
        t("/c", "POST", n, e)
    }
      , k = function(e) {
        doRefresh && (clearTimeout(u),
        u = setTimeout(function() {
            b(K)
        }, e))
    }
      , N = function(e, n) {
        var i = {
            pid: __challenger_conf.cpid,
            lang: __challenger_conf.lang,
            rat: __challenger_stats,
            param: __challenger_conf.param
        };
        window.__challenger_conf.p && (i.param = window.__challenger_conf.p),
        t("/m?cid=" + e + "&mtype=0", "GET", i, n)
    }
      , E = function(e) {
        var t = JSON.parse(e)
          , n = a(t.key, t.seed, t.mask);
        document.getElementById("cres").value = n
    }
      , A = function(e) {
        var t = document.getElementById("pin-text");
        e.match(/\*/),
        t.innerHTML = "以下の携帯電話番号に認証コードを送信いたしました。届いた「認証コード」を入力し、次の手続きにお進みください";
        var n = document.createElement("div");
        n.id = "phone-value",
        n.className = "phone-value",
        n.innerHTML = e;
        var i = document.createElement("div");
        i.id = "pin-modifyPhone-txt",
        i.className = "pin-modifyPhone-txt",
        i.innerHTML = "[変更]",
        d(n, t),
        d(i, n),
        document.getElementById("pin-modifyPhone-txt").onclick = function() {
            window.__challenger_conf.p.phone = "required",
            g = m,
            b(K)
        }
    }
      , L = {
        EMPTY: 0,
        CAPTCHA: 1,
        POW: 2,
        VIBER: 3,
        SMS: 4
    }
      , T = "data:image/png;base64, "
      , M = function(e, t) {
        t = t || {};
        var n = window.__challenger_conf.mdata;
        if (window.__challenger_conf.mdata = null,
        n && "string" == typeof n)
            switch (e) {
            case L.CAPTCHA:
                var i = n.split(",");
                if (2 == i.length && t.refreshElement && t.imgElement)
                    return t.imgElement.src = T + i[0],
                    t.refreshElement.src = T + i[1],
                    !0;
            case L.VIBER:
                var a = n.split(",");
                if (2 == a.length && t.refreshElement)
                    return t.refreshElement.src = T + a[1],
                    !0;
            case L.POW:
                return E(n),
                !0;
            case L.SMS:
                return A(n),
                !0;
            default:
                return !1
            }
        return !1
    }
      , K = function(e, t) {
        var n = JSON.parse(e)
          , i = document.getElementById("challenger");
        if (null != i) {
            for (; i.firstChild; )
                i.removeChild(i.firstChild);
            if (clearTimeout(p),
            clearTimeout(f),
            v = 0,
            429 == t) {
                var a = document.createElement("div");
                a.innerText = "認証コードの使用期限が切れました。再度認証コードをリクエストしてください",
                a.id = "pin-threshold-txt",
                a.className = "pin-threshold-txt";
                var o = document.createElement("div");
                o.className = "pin-resend-box",
                m = 60,
                g = m,
                s(o),
                i.appendChild(a),
                i.appendChild(o)
            } else if (400 == t && "phone_required" == n.code) {
                var c = document.createElement("div");
                c.innerText = "認証コードを受信できる携帯電話番号を入力して「認証コードを送信」を押してください",
                c.id = "pin-verifyphone-txt",
                c.className = "pin-verifyphone-txt";
                var l = document.createElement("div");
                l.innerText = "※ハイフン(-)なしでご入力ください",
                l.id = "phonehelp-txt",
                l.className = "phonehelp-txt";
                var d = document.createElement("input");
                d.id = "pin-verifyphone-input",
                d.className = "pin-verifyphone-input",
                d.setAttribute("type", "tel"),
                d.placeholder = "電話番号をご入力ください";
                var h = document.createElement("div");
                h.id = "send_btn",
                r(h),
                i.appendChild(c),
                i.appendChild(l),
                i.appendChild(d),
                i.appendChild(h)
            } else if (400 == t && "ttl_expired" == n.code) {
                var u = document.createElement("div");
                u.innerText = "セッションの有効期限が切れています",
                u.id = "ttl-expired-txt",
                u.className = "ttl-expired-txt",
                i.appendChild(u)
            } else if (403 == t && "phone_blocked" == n.code) {
                var x = document.createElement("div");
                x.innerText = "不正なアクセスが疑われたため処理を中断いたしました",
                x.id = "phone-blocked-txt",
                x.className = "phone-blocked-txt",
                i.appendChild(x)
            } else {
                document.getElementsByName("cid")[0].value = n.result.cid;
                var _ = document.createElement("img")
                  , y = document.createElement("div")
                  , C = document.createElement("img")
                  , w = document.createElement("br")
                  , O = document.createElement("br")
                  , T = document.createElement("input")
                  , R = document.createElement("span");
                switch (n.result.ctype) {
                case 1:
                case 7:
                case 15:
                    k(115e3);
                    try {
                        var P = document.getElementsByName("cres")[0];
                        P.parentNode && P.parentNode.removeChild(P)
                    } catch (e) {}
                    _.className = "c-text",
                    M(L.CAPTCHA, {
                        refreshElement: C,
                        imgElement: _
                    }) || (_.src = __challenger_conf.capi + "/m?cid=" + n.result.cid + "&mtype=0",
                    C.src = "https://challenger.api.global.rakuten.com/static/refresh.png"),
                    y.className = "c-refresh-div",
                    C.className = "c-refresh",
                    w.className = "c-break",
                    R.className = "c-old-ie",
                    R.innerHTML = "上記のテキストを入力してください",
                    T.className = "c-input",
                    T.id = "cres",
                    T.name = "cres",
                    T.type = "text",
                    T.value = "",
                    T.placeholder = "上記のテキストを入力してください",
                    i.appendChild(_),
                    i.appendChild(y),
                    y.appendChild(C),
                    i.appendChild(w),
                    i.appendChild(R),
                    i.appendChild(T),
                    y.onclick = function() {
                        S(),
                        b(K)
                    }
                    ;
                    break;
                case 31:
                case 63:
                    try {
                        var P = document.getElementsByName("cres")[0];
                        P.parentNode && P.parentNode.removeChild(P)
                    } catch (e) {}
                    y.className = "c-refresh-div",
                    C.className = "c-refresh",
                    M(L.VIBER, {
                        refreshElement: C
                    }) || (C.src = "https://challenger.api.global.rakuten.com/static/refresh.png"),
                    w.className = "c-break",
                    O.className = "c-break",
                    R.className = "c-old-ie",
                    R.innerHTML = "Viberメッセージから6桁を入力してください",
                    T.className = "c-pin-input",
                    T.name = "cres",
                    T.id = "cres",
                    T.type = "text",
                    T.value = "",
                    T.placeholder = "Viberメッセージから6桁を入力してください",
                    i.appendChild(R),
                    i.appendChild(T),
                    i.appendChild(w),
                    i.appendChild(y),
                    y.appendChild(C),
                    i.appendChild(O),
                    y.onclick = function() {
                        S(),
                        b(K)
                    }
                    ;
                    break;
                case 127:
                case 128:
                case 129:
                    k(115e3);
                    try {
                        var P = document.getElementsByName("cres")[0];
                        P.parentNode && P.parentNode.removeChild(P)
                    } catch (e) {}
                    var B = document.createElement("input");
                    B.name = "cres",
                    B.id = "cres",
                    B.type = "hidden",
                    B.value = "",
                    i.appendChild(B),
                    M(L.POW) || N(n.result.cid, E);
                    break;
                case 255:
                case 511:
                    try {
                        var P = document.getElementsByName("cres")[0];
                        P.parentNode && P.parentNode.removeChild(P)
                    } catch (e) {}
                    var H = document.createElement("div");
                    H.id = "pin-text",
                    H.className = "pin-text",
                    T.className = "c-pin-input",
                    T.id = "c-pin-input",
                    T.name = "cres",
                    T.id = "cres",
                    T.type = "text",
                    T.maxlength = "6",
                    T.placeholder = "認証コードをご入力ください";
                    var X = document.createElement("div");
                    X.id = "smshelp-txt",
                    X.className = "smshelp-txt",
                    X.innerText = "携帯電話に認証コードが届かない場合は以下のボタンから再度リクエストしてください";
                    var o = document.createElement("div");
                    o.id = "resend_btn",
                    o.className = "pin-resend-box",
                    m = 60,
                    g = m,
                    s(o),
                    i.appendChild(H),
                    i.appendChild(T),
                    i.appendChild(X),
                    i.appendChild(o),
                    M(L.SMS) || N(n.result.cid, A);
                    break;
                default:
                    k(115e3);
                    try {
                        var P = document.getElementsByName("cres")[0];
                        P.parentNode && P.parentNode.removeChild(P)
                    } catch (e) {}
                    var B = document.createElement("input");
                    B.name = "cres",
                    B.id = "cres",
                    B.type = "hidden",
                    B.value = "",
                    i.appendChild(B)
                }
            }
        }
    };
    __challenger.callPageRequest = function() {
        __challenger_events.start_time = (new Date).getTime(),
        y = __challenger_events.start_time,
        S(),
        b(K)
    }
    ;
    var R = __challenger_conf.cdata;
    null !== R && void 0 !== R ? (window.__challenger_conf.cdata = null,
    K(R, 200)) : __challenger.callPageRequest(),
    __challenger.callFormSubmit = function() {
        t("/p", "POST", {
            cid: document.getElementsByName("cid")[0].value,
            bio: __challenger_events
        })
    }
    ,
    __challenger.callOnClick = function() {
        __challenger_events.mc += 1
    }
    ,
    __challenger.callOnMouseMove = function(e) {
        __challenger_events.mm += 1;
        var t = (new Date).getTime();
        _.push([e.x, e.y, t - y]),
        y = t
    }
    ,
    __challenger.callOnKeyUp = function() {
        __challenger_events.kp += 1
    }
    ,
    __challenger.callOnTouchStart = function() {
        __challenger_events.ts += 1
    }
    ,
    O(window, "click", __challenger.callOnClick),
    O(window, "mousemove", __challenger.callOnMouseMove),
    O(window, "keyup", __challenger.callOnKeyUp),
    O(window, "touchstart", __challenger.callOnTouchStart),
    function(e) {
        for (var t = document.getElementsByTagName("form"), n = 0; n < t.length; n++)
            O(t[n], "submit", e)
    }(__challenger.callFormSubmit)
}(window.challengerCustomFunction);
